package com.top.service;

import com.top.bean.System_user;
import com.top.bean.User_detail_info;
import com.top.dao.userDao;
import com.top.dao.userDaoImpl;


public class userServiceImpl implements userService {
   userDao userDao = new userDaoImpl();//引入dao对象,调用数据库方法

    @Override
    public boolean login(String user_name, String password) {
        boolean flag = userDao.login(user_name, password);
        return flag;
    }

    @Override
    public boolean reg(System_user user, User_detail_info user_info) {
        int i = userDao.insert(user, user_info);
        if (i>0){
            return true;
        }else return false;
    }
}

